package com.example.demo34permission;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;


@SpringBootApplication
/**
 * @PreAuthorize：方法执行前进行权限检查
 * @PostAuthorize：方法执行后进行权限检查
 * @Secured：类似于 @PreAuthorize
 */
@EnableGlobalMethodSecurity(prePostEnabled = true,securedEnabled = true)
public class Demo34PermissionApplication {

    public static void main(String[] args) {
        SpringApplication.run(Demo34PermissionApplication.class, args);
    }

}
